package collection;

import java.util.ArrayList;
import java.util.List;

public class ListDemo2 {
    public static void main(String[] args) {
        List<String>list = new ArrayList<>();
        list.add("一");
        list.add("二");
        list.add("三");
        list.add("四");
        list.add("五");
        System.out.println(list);
        //把删除的元素放到old中
        String old = list.remove(2);
        System.out.println(old);
        System.out.println(list);



    }
}
